package com.freewater.library.common.infrastructure.event;


import com.freewater.library.common.domain.DomainEvent;

import java.util.List;

public interface DomainEventDispatcher {

    void dispatch(DomainEvent event);

    default void dispatch(List<DomainEvent> events) {
        for (DomainEvent event : events) {
            dispatch(event);
        }
    }
}
